#pragma once

#include "base\alphawnd.h"

class CPaintWindow : public CAlphaWnd
{
public:
	CPaintWindow();
	static CPaintWindow *	Instance();
	void					Show();
	void					Hide();
	void					DrawMove();
	virtual void			DrawLayer();
	void					NewPage();
	void					ClearPage();
	void					AddPageNo(Graphics &graphics);
	void					AddLicence(Graphics &graphics);
	void					LoadPicture();
	void					PrintCurrentPage();

protected:
	virtual BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult);

protected:
	//{{AFX_MSG(CDrawWindow)
	afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnClose();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
	CPoint		m_lastPoint;
	CDC			m_lastDC;
	CBitmap		m_lastBitmap;

	int			m_width;
	int			m_height;

private:
	static void CALLBACK DrawMoveTimer(HWND hwnd, UINT uiMsg, UINT idEvent, DWORD dwTime);

private:
	UINT_PTR m_DrawMoveTimer;
	//Playback
private:
	UINT_PTR		m_hPlayBackTimer;
	int				m_PBRunNo;
	int				m_MoveTimes;
	static void		CALLBACK PlayBackTimer(HWND hwnd, UINT uiMsg, UINT idEvent, DWORD dwTime);
	void			PlayBack();
	void			DoPlayBack();
};